package collection;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Comparator;

public class demo5 {
    public static void main(String[] args) {
       Integer[]arr = {1,2,3,4,5,6,7,8,9};
        Arrays.sort(arr, ( o1,  o2)-> o2 - o1);
        System.out.println(Arrays.toString(arr));
    }
}
